package com.hc.springbootschedule.spring.springScheduled;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class SpringTaskTest {

    /**
     * 方法每十秒执行一次
     */
    @Scheduled(cron = "*/10 * * * * ?")
    public void fun() {
        System.out.println("doSomething");
    }
}